package com.ulwx.tool.excel;

import java.util.Map;

import net.sf.jxls.transformer.XLSTransformer;

import org.apache.log4j.Logger;

public class WriteExcelByTemplate {
	
	private static final Logger log = Logger.getLogger(WriteExcelByTemplate.class);
	public static boolean export(Map<String,Object> bean, 
			String excelTemplateFilePath, String destExcelFilePath){
		boolean successTag = true;

		
		XLSTransformer transformer = new XLSTransformer();
		try {
			transformer.transformXLS(excelTemplateFilePath,
					bean, destExcelFilePath);
		} catch (Exception e) {
			successTag = false;
			
		}
		return successTag;
	}
}
